import java.util.Arrays;
import java.util.Scanner;

/**
 * @ Author     ：侯耀祖
 * @ Description：
 */
public class climbStairs {
    public int climbStairs(int n) {
        int[] dp = new int[n+1];
        dp[1] = 1;
        dp[2] = 2;
        for (int i = 3; i <= n; i++){
            dp[i] = dp[i-1]+dp[i+2];
        }
        return dp[n];
    }
    public static int climbStairsm(int n, int m) {
        int[] dp = new int[n+1];
        dp[1] = 1;
        for (int i = 2; i <= n; i++){
            for (int j = 1; j <= m; j++) {
                if (i-j>0)
                    dp[i] += dp[i-j];
            }
        }
        return dp[n];
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[] dp = new int[n+1];
        dp[0] = 1;
        for (int i = 1; i <= n; i++){
            for (int j = 1; j <= m; j++) {
                if (i-j>=0)
                    dp[i] += dp[i-j];
            }
        }
        System.out.println(Arrays.toString(dp));
    }
}
